package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.SysUserNotice;
import com.ruoyi.system.mapper.SysUserNoticeMapper;
import com.ruoyi.system.service.ISysUserNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户通知记录Service业务层处理
 *
 * @author dp
 * @date 2023-12-05
 */
@Service
public class SysUserNoticeServiceImpl implements ISysUserNoticeService {
    @Autowired
    private SysUserNoticeMapper sysUserNoticeMapper;

    /**
     * 查询用户通知记录
     *
     * @param userId 用户通知记录主键
     * @return 用户通知记录
     */
    @Override
    public SysUserNotice selectSysUserNoticeByUserId(Long userId) {
        return sysUserNoticeMapper.selectSysUserNoticeByUserId(userId);
    }

    /**
     * 查询用户通知记录列表
     *
     * @param sysUserNotice 用户通知记录
     * @return 用户通知记录
     */
    @Override
    public List<SysUserNotice> selectSysUserNoticeList(SysUserNotice sysUserNotice) {
        return sysUserNoticeMapper.selectSysUserNoticeList(sysUserNotice);
    }

    /**
     * 新增用户通知记录
     *
     * @param sysUserNotice 用户通知记录
     * @return 结果
     */
    @Override
    public int insertSysUserNotice(SysUserNotice sysUserNotice) {
        return sysUserNoticeMapper.insertSysUserNotice(sysUserNotice);
    }

    /**
     * 修改用户通知记录
     *
     * @param sysUserNotice 用户通知记录
     * @return 结果
     */
    @Override
    public int updateSysUserNotice(SysUserNotice sysUserNotice) {
        return sysUserNoticeMapper.updateSysUserNotice(sysUserNotice);
    }

    /**
     * 批量删除用户通知记录
     *
     * @param userIds 需要删除的用户通知记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNoticeByUserIds(Long[] userIds) {
        return sysUserNoticeMapper.deleteSysUserNoticeByUserIds(userIds);
    }

    /**
     * 删除用户通知记录信息
     *
     * @param userId 用户通知记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNoticeByUserId(Long userId) {
        return sysUserNoticeMapper.deleteSysUserNoticeByUserId(userId);
    }
}
